

from itertools import count


class Solution:
    def smallestRepunitDivByK(self, k: int) -> int:
        num = cnt = 1
        s = set()
        while num%k!=0:
            if num in s :
                return -1
            s.add(num)
            num %= k
            num = num * 10 + 1
            cnt+=1
        return cnt 
    

print(count(1))